/**   
 * 项目名：化工企业安全生产信息化管理平台
 * 日期：    2020-04-18 23:54:04  
 * Copyright (c) 2015- -版权所有     
 */
package com.joysuch.wwyt.core.service;

import com.joysuch.wwyt.api.base.dto.ApiRoleDto;
import com.joysuch.wwyt.core.entity.BaseRole;

import com.joysuch.wwyt.core.bean.BaseRoleDetailBean;
import com.joysuch.wwyt.core.bean.BaseRoleEditBean;
import com.joysuch.wwyt.core.bean.BaseRoleListBean;
import static com.joysuch.wwyt.core.bean.BaseRoleListBean.SearchBaseRole;
import com.joysuch.wwyt.core.exception.BusinessRestrictionsException;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface BaseRoleService {

    public BaseRole add(BaseRoleEditBean entity);

    void update(BaseRoleEditBean entity);

    Page<BaseRoleListBean> findByPage(Pageable page,SearchBaseRole condition);

    void delete(Long id) throws BusinessRestrictionsException;

    BaseRoleDetailBean getById(Long id);

    BaseRole findById(Long id);

    /**
     * 获取所有角色信息
     * @param roleName
     * @param remark
     * @param tenentId
     * @param orgCode
     * @return
     */
    List<ApiRoleDto> getListForApi(String roleName, String remark, Long tenentId, String orgCode);

    com.baomidou.mybatisplus.extension.plugins.pagination.Page<ApiRoleDto> getListByPageForApi(Integer page, Integer size, String roleName, String remark, Long tenentId, String orgCode);
    
}
